import request from "@/libs/request";

export function bookChapterList(data) {
  return request({
    url: "/sync/bookChapterTemp/list",
    method: "post",
    data,
  });
}

export function chapterTreeSelect(data) {
  return request({
    url: "/sync/bookChapterTemp/selectChapterTree",
    method: "post",
    data,
  });
}

export function bookSelect(data) {
  return request({
    url: "/sync/bookChapterTemp/bookSelect",
    method: "post",
    data,
  });
}

export function getAllBook(data) {
  return request({
    url: "/sync/api/bookChapter/getAllBook",
    method: "post",
    data,
  });
}

export function getFavBooks(data) {
  return request({
    url: "/sync/api/bookChapter/getFavBooks",
    method: "post",
    data,
  });
}

export function addUserLearningBook(data) {
  return request({
    url: "/sync/api/bookChapter/addUserLearningBook",
    method: "post",
    data,
  });
}

export function evaluationChart(type) {
  return request({
    url: `/sync/api/evaluation/chart/${type}`,
    method: "post",
  });
}

export function evaluationRecord(query, data) {
  return request({
    url: "/sync/api/evaluation/evaluationRecord",
    method: "post",
    params: query,
    data,
  });
}

export function startEvaluation(data) {
  return request({
    url: "/sync/api/evaluation/startEvaluation",
    method: "post",
    data,
  });
}

export function commitEvaluation(data) {
  return request({
    url: "/sync/api/evaluation/commitEvaluation",
    method: "post",
    data,
  });
}

export function evaluationCount() {
  return request({
    url: "/sync/api/evaluation/evaluationCount",
    method: "post",
  });
}

export function selectVoByWord(word) {
  return request({
    url: `/sync/word/selectVoByWord/${word}`,
    method: "post",
  });
}

export function getModule() {
  return request({
    url: "/sync/api/bookChapter/getModule",
    method: "post",
  });
}

export function getGradeList() {
  return request({
    url: "/sync/grade/list",
    method: "post",
  });
}

export function getBooks(id) {
  return request({
    url: "/sync/api/bookChapter/getBooks/" + id,
    method: "get",
  });
}

export function getDefaultBook() {
  return request({
    url: "/sync/api/bookChapter/defaultBook/dcsj",
    method: "get",
  });
}

export function chooseBook(id) {
  return request({
    url: "/sync/api/bookChapter/chooseBook/dcsj/" + id,
    method: "post",
  });
}

export function getChapters(id) {
  return request({
    url: "/sync/api/bookChapter/getChapters/" + id,
    method: "get",
  });
}

export function getWords(type, id) {
  return request({
    url: `/sync/api/sync/wordsByChapterId/${type}/${id}`,
    method: "post",
  });
}

export function saveChooseWord(data) {
  return request({
    url: "/sync/api/sync/saveChooseWord",
    method: "post",
    data: data,
  });
}

export function saveWordLearningRecord(data) {
  return request({
    url: "/sync/api/sync/saveWordLearningRecord",
    method: "post",
    data: data,
  });
}

export function getSyncIpaBaseDetail(phonetic) {
  return request({
    url: "/sync/syncIpaBase/detail/" + phonetic,
    method: "post",
  });
}

export function csWord(data) {
  return request({
    url: "/sync/api/sync/cs",
    method: "post",
    data: data,
  });
}

export function getKsDetail(chapterId) {
  return request({
    url: "/sync/api/sync/ksDetail/" + chapterId,
    method: "get",
  });
}

export function saveKs(data) {
  return request({
    url: "/sync/api/sync/saveKs",
    method: "post",
    data: data,
  });
}

export function getKyw21List(type) {
  return request({
    url: "/sync/api/sync/kyw21List/" + type,
    method: "get",
  });
}

export function getKyw21His(id) {
  return request({
    url: "/sync/api/sync/kyw21his/" + id,
    method: "get",
  });
}

export function getKyw21Detail(id) {
  return request({
    url: "/sync/api/sync/kyw21Detail/" + id,
    method: "get",
  });
}

export function getUserExamPage(type) {
  return request({
    url: "/sync/task/api/userExamPageByTimeType/" + type,
    method: "post",
  });
}

export function getWordPaperResult(data) {
  return request({
    url: "/sync/task/api/wordPaperResult",
    method: "post",
    data,
  });
}
export function getScbList(type) {
  return request({
    url: "/sync/api/sync/scb/" + type,
    method: "get",
  });
}

export function deleteSc(data) {
  return request({
    url: "/sync/api/sync/deleteSc",
    method: "post",
    data,
  });
}

export function getScsl(data) {
  return request({
    url: "/sync/api/sync/scsl",
    method: "get",
  });
}

export function getJrfxTime(type) {
  return request({
    url: "/sync/api/sync/jrfxTime/" + type,
    method: "get",
  });
}

export function getFxDetail(dateTime) {
  return request({
    url: "/sync/api/sync/fxDetail/" + dateTime,
    method: "get",
  });
}

export function getFxDetailByFx(id) {
  return request({
    url: "/sync/api/sync/fxDetailByFx/" + id,
    method: "get",
  });
}

export function getErrWordsByFx(id) {
  return request({
    url: "/sync/api/sync/errWordsByFx/" + id,
    method: "get",
  });
}

export function getJrxxWords(dateTime) {
  return request({
    url: "/sync/api/sync/jrxxWords/" + dateTime,
    method: "get",
  });
}

export function getJd(type, chapterId) {
  return request({
    url: "/sync/api/sync/jd/" + type + "/" + chapterId,
    method: "post",
  });
}

export function saveWordJd(data) {
  return request({
    url: "/sync/api/sync/saveWordJd",
    method: "post",
    data: data,
  });
}

export function resetRec(chapterId) {
  return request({
    url: "/sync/api/sync/resetRec/" + chapterId,
    method: "post",
  });
}

export function getChapterLockFlag(chapterId) {
  return request({
    url: "/sync/api/sync/chapterLockFlag/" + chapterId,
    method: "get",
  });
}

export function getBooksByType(type) {
  return request({
    url: "/sync/api/bookChapter/getBooksByType/" + type,
    method: "get",
  });
}

export function getChaptersByType(type, bookId) {
  return request({
    url: "/sync/api/bookChapter/getChapters/" + type + "/" + bookId,
    method: "get",
  });
}

export function getLtsIndex(chapterId) {
  return request({
    url: "/sync/api/sync/ltsIndex/" + chapterId,
    method: "get",
  });
}

export function getLtsDetail(chapterId) {
  return request({
    url: "/sync/api/sync/ltsDetail/" + chapterId,
    method: "get",
  });
}

export function getLtsAnalys(query) {
  return request({
    url: "/sync/api/sync/ltsAnalys",
    method: "get",
    params: query,
  });
}

export function kyw21dk(data) {
  return request({
    url: "/sync/api/sync/kyw21dk",
    method: "post",
    data: data,
  });
}
